package com.resou.reader.utils.recyclerviewhelpler;

import android.support.v7.widget.RecyclerView;

import java.util.List;

/**
 * Created by ${Garrett} on 2018/9/16.
 * Contact me krouky@outlook.com
 */
public abstract class BaseSimpleAdapter<T> extends RecyclerView.Adapter {

    protected List<T> mList;

    public BaseSimpleAdapter(List<T> source) {
        this.mList = source;
    }

    public void setList(List<T> source) {
        this.mList = source;
    }

    @Override
    public int getItemCount() {
        return mList == null ? 0 : mList.size();
    }
}
